writing formulas for ionic compounds with transition metals